// DialogView.h : interface of the CDialogView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_DIALOGVIEW_H__9C3EDFCF_4384_4DC0_90D2_31908C13A8F0__INCLUDED_)
#define AFX_DIALOGVIEW_H__9C3EDFCF_4384_4DC0_90D2_31908C13A8F0__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "DialogDoc.h"

class CDialogView : public CScrollView
{
protected: // create from serialization only
	CDialogView();
	DECLARE_DYNCREATE(CDialogView)

// Attributes
public:
	CDialogDoc* GetDocument();

	typedef CDialogDoc::DIALOG DIALOG;
	typedef CDialogDoc::DITEM DITEM;
	typedef CDialogDoc::TDATA TDATA;

	DIALOG*	m_pSelDlg;
	DITEM*	m_pItem;

	DITEM*	HitSelect(int x, int y);

protected:
	CBrush m_brBkgnd;
	CBrush m_brHatch;

	UINT	m_nTimer;
	
protected:
	BOOL	m_bDragging;
	CPoint	m_ptOffset;

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CDialogView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual void OnInitialUpdate(); // called first time after construct
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CDialogView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CDialogView)
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg void OnDestroy();
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in DialogView.cpp
inline CDialogDoc* CDialogView::GetDocument()
   { return (CDialogDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_DIALOGVIEW_H__9C3EDFCF_4384_4DC0_90D2_31908C13A8F0__INCLUDED_)
